package com.aplink.generic.constant.type;

import android.view.MenuItem;

public enum MenuShowAsActionType {

	ALWAYS("always", MenuItem.SHOW_AS_ACTION_ALWAYS),
	IF_ROOM("ifRoom", MenuItem.SHOW_AS_ACTION_IF_ROOM),
	NEVER("never", MenuItem.SHOW_AS_ACTION_NEVER),
	WITH_TEXT("withText", MenuItem.SHOW_AS_ACTION_WITH_TEXT);

	public static MenuShowAsActionType get(final String key) {
		for (final MenuShowAsActionType showAsActionType : MenuShowAsActionType
		        .values()) {
			if (showAsActionType.mKey.equalsIgnoreCase(key)) {
				return showAsActionType;
			}
		}
		return null;
	}

	private String mKey;

	private int mValue;

	private MenuShowAsActionType(final String key, final int value) {
		this.mKey = key;
		this.mValue = value;
	}

	public String getKey() {
		return this.mKey;
	}

	public int getValue() {
		return this.mValue;
	}

	public void setKey(final String key) {
		this.mKey = key;
	}

	public void setValue(final int value) {
		this.mValue = value;
	}
}
